#开发人员：mj
#开发日期：2020/7/18
#开发时间：22:09
#开发环境：PyCharm
import random
class Random_cls:
    "[startNum,endNum]区间生成countNum个随机数"
    def __init__(self,startNum,endNum,countNum):
        self.startNum = startNum
        self.endNum = endNum
        self.countNum = countNum
    def CreateRandomNum(self):
        listNum=list()
        listNum=random.sample(range(self.startNum, self.endNum),self.countNum)
        return listNum

def XYprint(*Num): # 这里变量名，因为Python中大写字母开头的一般都是默认为类，所以可以改一下
    "打印坐标值"
    new_Num = list(Num)
    new_list=list()
    while len(new_Num) >= 2:
        (x,y)=random.sample(new_Num,2)
        new_list.append((x,y),)
        new_Num.remove(x)
        new_Num.remove(y)
    return new_list




RN = Random_cls(0,50,20)
list1=RN.CreateRandomNum()
print(list1)
list2=XYprint(*list1)
print(list2)

# 完成的还可以
